<template>
  <div class="login_page">
    <mt-header style="font-size:18px;" title="工单登录">
      <router-link to="/" slot="left">
        <mt-button icon="back"></mt-button>
      </router-link>
    </mt-header>
    <div class="login_form">
      <img src="../../static/images/logo.png" alt="" />
      <mt-field
        class="login_info"
        label="用户名:"
        placeholder="请输入用户名"
        v-model="username"
      >
      </mt-field>
      <mt-field
        class="login_info"
        label="密码:"
        placeholder="请输入密码"
        v-model="password"
      ></mt-field>
      <p class="tip_info" ref="tip_info"></p>
      <mt-button style="width:100%" type="primary" @click="invidate_info"
        >登录</mt-button
      >
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    invidate_info() {
      // 此处登录表单的验证
      this.$refs.tip_info.innerText = '输入正确的用户名和密码'
    }
  }
};
</script>

<style lang="" scoped>
.login_page {
  width: 100%;
  height: 100%;
  background: url(../../static/images/bg.png);
  background-position: 100%;
}
.login_form {
  width: 90%;
  margin: 20% auto 0;
}
.login_form > img {
  width: 80%;
  margin-bottom: 20px;
}
.login_info {
  margin-bottom: 20px;
}
.tip_info{
  height:16px;
  line-height:16px;
  font-size:12px;
  color:red;
  font-weight:700;
}
</style>
